home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / sun / volume1 / tooltool2.1c / part01 next >
Encoding:
Internet Message Format  |  1989-06-06  |  51.1 KB

  1. Path: uunet!cs.utexas.edu!rutgers!aramis.rutgers.edu!dartagnan.rutgers.edu!mcgrew
  2. From: mcgrew@dartagnan.rutgers.edu (Charles Mcgrew)
  3. Newsgroups: comp.sources.sun
  4. Subject: v01i020:  Tooltool - a suntools user interface builder, Part 01/13
  5. Message-ID: <Jun.7.00.01.01.1989.22896@dartagnan.rutgers.edu>
  6. Date: 7 Jun 89 04:01:20 GMT
  7. Organization: Rutgers Univ., New Brunswick, N.J.
  8. Lines: 1501
  9. Approved: mcgrew@aramis.rutgers.edu
  10.  
  11. Submitted-by: Chuck Musciano <chuck@trantor.harris-atd.com>
  12. Posting-number: Volume 1, Issue 20
  13. Archive-name: tooltool2.1c/part01
  14.  
  15.    This is version 2.1c of of Chuck Musciano's "tooltool".  The latest
  16. version from the titan.rice.edu (so far as I know) is 2.0a.
  17.  
  18.  
  19.                             Charles
  20.  
  21.  
  22.      Tooltool allows you to build relatively complex windowed user interfaces
  23. for non-windowed applications using an English-like specification language.
  24. Tooltool comes complete with an 80 page manual and several sample interface
  25. specifications.
  26.  
  27. Chuck Musciano            ARPA  : chuck@trantor.harris-atd.com
  28. Harris Corporation         Usenet: ...!uunet!x102a!trantor!chuck
  29. PO Box 37, MS 3A/1912        AT&T  : (407) 727-6131
  30. Melbourne, FL 32902        FAX   : (407) 727-{5118,5227,4004}
  31.  
  32. #! /bin/sh
  33. # This is a shell archive.  Remove anything before this line, then unpack
  34. # it by saving it into a file and typing "sh file".  To overwrite existing
  35. # files, type "sh file -c".  You can also feed this as standard input via
  36. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  37. # will see the following message at the end:
  38. #        "End of archive 1 (of 13)."
  39. # Contents:  MANIFEST Makefile README doc doc/Makefile emalloc.c
  40. #   patchlevel.h samples samples/calc.tt samples/laserwriter.icon
  41. #   samples/lpq.tt samples/news.icon samples/queue.c samples/rn.tt
  42. #   samples/stopwatch.icon samples/top.icon samples/vt100
  43. #   samples/vt100/Makefile samples/vt100/VTEM_README
  44. #   samples/vt100/vt.icon samples/vt100/vtem.1 samples/vt100/vtem.h
  45. #   selection.c tooltool.icon tooltool.man
  46. # Wrapped by chuck@melmac on Thu Jun  1 10:39:25 1989
  47. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  48. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  49.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  50. else
  51. echo shar: Extracting \"'MANIFEST'\" \(1891 characters\)
  52. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  53. X   File Name        Archive #    Description
  54. X-----------------------------------------------------------
  55. X MANIFEST                   1    This shipping list
  56. X Makefile                   1    
  57. X README                     1    
  58. X actions.c                  4    
  59. X doc                        1    
  60. X doc/Makefile               1    
  61. X doc/tooltool.uu.1         10    
  62. X doc/tooltool.uu.2         12    
  63. X doc/tooltool.uu.3         11    
  64. X doc/tooltool.uu.4         13    
  65. X doc/tooltool.uu.5          9    
  66. X emalloc.c                  1    
  67. X events.c                   4    
  68. X expr.c                     5    
  69. X func.c                     5    
  70. X func_fix.c                 2    
  71. X lex.c                      5    
  72. X misc.c                     4    
  73. X objects.c                  7    
  74. X parse.y                    8    
  75. X patchlevel.h               1    
  76. X samples                    1    
  77. X samples/README             2    
  78. X samples/calc.tt            1    
  79. X samples/keytool            6    
  80. X samples/keytool.defaults.uu  2    
  81. X samples/keytool.l          3    
  82. X samples/keytool.r.14.uu    3    
  83. X samples/laserwriter.icon   1    
  84. X samples/lpq.tt             1    
  85. X samples/lpq2.tt            2    
  86. X samples/news.icon          1    
  87. X samples/queue.c            1    
  88. X samples/rn.tt              1    
  89. X samples/stopwatch.icon     1    
  90. X samples/stopwatch.tt       3    
  91. X samples/top.icon           1    
  92. X samples/top.tt             2    
  93. X samples/vt100              1    
  94. X samples/vt100/Makefile     1    
  95. X samples/vt100/VTEM_README  1    
  96. X samples/vt100/edtkeys.ras.uu  2    
  97. X samples/vt100/newskeys.ras.uu  3    
  98. X samples/vt100/out.c        7    
  99. X samples/vt100/term.c       3    
  100. X samples/vt100/vt.icon      1    
  101. X samples/vt100/vt102tool.tt  2    
  102. X samples/vt100/vtem.1       1    
  103. X samples/vt100/vtem.c       2    
  104. X samples/vt100/vtem.h       1    
  105. X selection.c                1    
  106. X symbols.c                  2    
  107. X tooltool.c                 3    
  108. X tooltool.h                 4    
  109. X tooltool.icon              1    
  110. X tooltool.man               1    
  111. X windows.c                  6    
  112. END_OF_FILE
  113. if test 1891 -ne `wc -c <'MANIFEST'`; then
  114.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  115. fi
  116. # end of 'MANIFEST'
  117. fi
  118. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  119.   echo shar: Will not clobber existing file \"'Makefile'\"
  120. else
  121. echo shar: Extracting \"'Makefile'\" \(1613 characters\)
  122. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  123. X# where you keep local executables
  124. XBINDIR        = /usr/local/bin
  125. X
  126. X# man directory for local man pages (usually /usr/man/manl)
  127. XMANDIR        = /usr/man/manl
  128. XMANEXT        = l
  129. X
  130. X# command which will print things on a LaserWriter
  131. XLPR        = /usr/ucb/lpr
  132. XPRINTER        = lw
  133. X
  134. XWINDOW_LIB    = -lsuntool -lsunwindow -lpixrect
  135. X
  136. XOFILES         = actions.o emalloc.o events.o expr.o func.o func_fix.o misc.o \
  137. X          objects.o parse.o selection.o symbols.o tooltool.o windows.o
  138. X
  139. XOPTIONS        = -O
  140. X
  141. X.c.o:
  142. X    cc $(OPTIONS) -c $<
  143. X
  144. X.y.o:
  145. X    yacc $<
  146. X    cc $(OPTIONS) -c -o $*.o y.tab.c
  147. X    rm y.tab.c
  148. X
  149. Xtooltool: $(OFILES)
  150. X    cc $(OPTIONS) -o tooltool $(OFILES) $(WINDOW_LIB) -lm
  151. X
  152. Xinstall: tooltool
  153. X    cp tooltool $(BINDIR)
  154. X    cp tooltool.man $(MANDIR)/tooltool.$(MANEXT)
  155. X
  156. Xmanual:
  157. X    cd doc; make manual LPR="$(LPR)" PRINTER="$(PRINTER)"
  158. X
  159. Xshar:
  160. X    cd doc/doc; make shar
  161. X    rm -f MANIFEST*
  162. X    makekit -s45k -oMANIFEST doc samples Makefile README *.[chy] *.icon *.man samples/* samples/vt100/* doc/Makefile doc/*.uu*
  163. X
  164. Xpatch: Makefile *.man *.[chy]
  165. X    rm -f patch temp
  166. X    -for i in Makefile *.man *.[chy] ; do \
  167. X       cp orig/$$i $${i}.orig ; \
  168. X       diff -c $${i}.orig $$i >>temp ; \
  169. X       rm $${i}.orig ; \
  170. X    done
  171. X    sed '/^No differences encountered/d' <temp >patch
  172. X    rm temp
  173. X
  174. Xnewver:
  175. X    for i in Makefile *.[chy] ; do \
  176. X       cp $$i orig/$$i ; \
  177. X    done
  178. X
  179. Xclean:
  180. X    rm -f *.o y.output tooltool core Part*
  181. X
  182. X#dependencies
  183. X
  184. Xactions.o: tooltool.h
  185. X
  186. Xemalloc.o: tooltool.h
  187. X
  188. Xevents.o: tooltool.h
  189. X
  190. Xexpr.o: tooltool.h
  191. X
  192. Xfunc.o: tooltool.h
  193. X
  194. Xfunc_fix.o: tooltool.h
  195. X
  196. Xmisc.o: tooltool.h
  197. X
  198. Xobjects.o: tooltool.h
  199. X
  200. Xparse.o: tooltool.h lex.c
  201. X
  202. Xselection.o: tooltool.h
  203. X
  204. Xsymbols.o: tooltool.h
  205. X
  206. Xtooltool.o: tooltool.h
  207. X
  208. Xwindows.o: tooltool.h
  209. END_OF_FILE
  210. if test 1613 -ne `wc -c <'Makefile'`; then
  211.     echo shar: \"'Makefile'\" unpacked with wrong size!
  212. fi
  213. # end of 'Makefile'
  214. fi
  215. if test -f 'README' -a "${1}" != "-c" ; then 
  216.   echo shar: Will not clobber existing file \"'README'\"
  217. else
  218. echo shar: Extracting \"'README'\" \(4684 characters\)
  219. sed "s/^X//" >'README' <<'END_OF_FILE'
  220. X/************************************************************************/
  221. X/*    Copyright 1988 by Chuck Musciano and Harris Corporation        */
  222. X/*                                    */
  223. X/*    Permission to use, copy, modify, and distribute this software    */
  224. X/*    and its documentation for any purpose and without fee is    */
  225. X/*    hereby granted, provided that the above copyright notice    */
  226. X/*    appear in all copies and that both that copyright notice and    */
  227. X/*    this permission notice appear in supporting documentation, and    */
  228. X/*    that the name of Chuck Musciano and Harris Corporation not be    */
  229. X/*    used in advertising or publicity pertaining to distribution    */
  230. X/*    of the software without specific, written prior permission.    */
  231. X/*    Chuck Musciano and Harris Corporation make no representations    */
  232. X/*    about the suitability of this software for any purpose.  It is    */
  233. X/*    provided "as is" without express or implied warranty.        */
  234. X/*                                    */
  235. X/*    The sale of any product based wholely or in part upon the     */
  236. X/*    technology provided by tooltool is strictly forbidden without    */
  237. X/*    specific, prior written permission from Harris Corporation.    */
  238. X/*    Tooltool technology includes, but is not limited to, the source    */
  239. X/*    code, executable binary files, specification language, and    */
  240. X/*    sample specification files.                    */
  241. X/************************************************************************/
  242. X
  243. X
  244. X     Tooltool is a new way to create windowed applications.  Using existing
  245. Xapplications, and a simple specification language, users can produce
  246. Xwindowed tools with gadgets, mouse actions, and keyboard remapping without
  247. Xhaving to learn or use the SunView programming interface.
  248. X
  249. X     To build tooltool, first check a few site dependencies in the Makefile
  250. Xand in tooltool.c.  These dependencies are:
  251. X
  252. X    In Makefile:
  253. X        BINDIR        Where the executable will go, normally
  254. X                /usr/local/bin
  255. X        MANDIR        Where the man page will go, normally
  256. X                /usr/man/manl
  257. X        MANEXT        The man page extension, usually 'l',
  258. X                for local man pages.  You may want to
  259. X                make MANDIR /usr/man/man1, in which case
  260. X                MANEXT should be '1'.
  261. X        LPR        The complete command you would use to
  262. X                print something on your local LaserWriter.
  263. X                Typically, this is /usr/ucb/lpr, but you
  264. X                might need a different printer name than
  265. X                the default.
  266. X    In windows.c:
  267. X        TOOLTOOL_ICON    Where the tooltool icon can be found.
  268. X                Normally, it is in the directory that you
  269. X                created tooltool in, but you might want to move
  270. X                it to a more global place.  We keep all our
  271. X                icons in /usr/local/images, for example.
  272. X                Fix this path to match where you put the icon.
  273. X
  274. XYou can then build tooltool by typing "make tooltool".  If you wish to try out
  275. Xthe sample applications, cd to samples, and type "../tooltool -f <file>.tt",
  276. Xwhere <file>.tt is any of the .tt files in the directory.  See the README
  277. Xin samples for more information.  When in samples, if you haven't installed
  278. Xtooltool, you'll need to use "../tooltool" to invoke tooltool.
  279. X
  280. X     Tooltool comes with extensive documentation, which is printed by typing
  281. X"make manual".  The manual will emerge from your LaserWriter.  It should print
  282. Xon either a regular LaserWriter, LaserWriter Plus, or LaserWriter II NT or
  283. XNTX.  If you have problems getting it to print, please send e-mail.  If you
  284. Xdo not have a LaserWriter, I'll be glad to mail you hardcopy.  Just send
  285. Xa request via e-mail or call me.
  286. X
  287. X     I think tooltool opens up a new world of easy application programming.
  288. XI am very interested in seeing how others use tooltool, and any comments
  289. Xor suggestions you may have.  If you send me your e-mail address, I will
  290. Xkeep you up to date with bug fixes, patches, and enhancements.  If you
  291. Xhave a good tooltool file, I'll be glad to distribute it to anyone who
  292. Xrequests it.  In particular, I'd like to see tooltool specs for things
  293. Xlike vi, gnuemacs, various games, and the like.  Bottom line: get on the
  294. Xtooltool mailing list, and I'll keep you up to date as things progress.
  295. X
  296. X     Many thanks are due the tooltool betatesting team, who perservered
  297. Xthrough early releases of this version while I frantically fixed all the
  298. Xbugs.  The betatesting team was:
  299. X
  300. X    Ian Clowes            Ken Laprade
  301. X    Paul J. Emerson            Andy Lord
  302. X    Phill Everson            David Masterson
  303. X    David Fickes            Neil Movold
  304. X    David Forslund            Troy D. Spetz
  305. X    Len Jacobs            Larry W. Virden
  306. X    Orest Jarosiewicz        C. Philip Wood
  307. X    Doug Johnson            Peter Windsor
  308. X    Philip Kegelmeyer        Mitchell F. Wyle     
  309. X    Francis Kam
  310. X
  311. X     Please send all bugs, comments, requests, suggestions, and tooltool
  312. Xfiles to:
  313. X
  314. X    Chuck Musciano
  315. X    Advanced Technology Department
  316. X    Harris Corporation
  317. X    PO Box 37, MS 3A/1912
  318. X    Melbourne, FL 32902
  319. X
  320. X    (407) 727-6131
  321. X    ARPA: chuck@trantor.harris-atd.com
  322. X
  323. XI hope you find tooltool useful!
  324. END_OF_FILE
  325. if test 4684 -ne `wc -c <'README'`; then
  326.     echo shar: \"'README'\" unpacked with wrong size!
  327. fi
  328. # end of 'README'
  329. fi
  330. if test ! -d 'doc' ; then
  331.     echo shar: Creating directory \"'doc'\"
  332.     mkdir 'doc'
  333. fi
  334. if test -f 'doc/Makefile' -a "${1}" != "-c" ; then 
  335.   echo shar: Will not clobber existing file \"'doc/Makefile'\"
  336. else
  337. echo shar: Extracting \"'doc/Makefile'\" \(257 characters\)
  338. sed "s/^X//" >'doc/Makefile' <<'END_OF_FILE'
  339. X.SUFFIXES:    .ps .uu
  340. X
  341. X.uu.ps:
  342. X    uudecode $<
  343. X    uncompress $*.ps.Z
  344. X
  345. Xmanual: tooltool.ps
  346. X    $(LPR) -P$(PRINTER) -J"Tooltool Manual" tooltool.ps
  347. X
  348. Xtooltool.uu: tooltool.uu.1 tooltool.uu.2 tooltool.uu.3 tooltool.uu.4 tooltool.uu.5
  349. X    cat tooltool.uu.[12345] >tooltool.uu
  350. END_OF_FILE
  351. if test 257 -ne `wc -c <'doc/Makefile'`; then
  352.     echo shar: \"'doc/Makefile'\" unpacked with wrong size!
  353. fi
  354. # end of 'doc/Makefile'
  355. fi
  356. if test -f 'emalloc.c' -a "${1}" != "-c" ; then 
  357.   echo shar: Will not clobber existing file \"'emalloc.c'\"
  358. else
  359. echo shar: Extracting \"'emalloc.c'\" \(2541 characters\)
  360. sed "s/^X//" >'emalloc.c' <<'END_OF_FILE'
  361. X/************************************************************************/
  362. X/*    Copyright 1988 by Chuck Musciano and Harris Corporation        */
  363. X/*                                    */
  364. X/*    Permission to use, copy, modify, and distribute this software    */
  365. X/*    and its documentation for any purpose and without fee is    */
  366. X/*    hereby granted, provided that the above copyright notice    */
  367. X/*    appear in all copies and that both that copyright notice and    */
  368. X/*    this permission notice appear in supporting documentation, and    */
  369. X/*    that the name of Chuck Musciano and Harris Corporation not be    */
  370. X/*    used in advertising or publicity pertaining to distribution    */
  371. X/*    of the software without specific, written prior permission.    */
  372. X/*    Chuck Musciano and Harris Corporation make no representations    */
  373. X/*    about the suitability of this software for any purpose.  It is    */
  374. X/*    provided "as is" without express or implied warranty.        */
  375. X/*                                    */
  376. X/*    The sale of any product based wholely or in part upon the     */
  377. X/*    technology provided by tooltool is strictly forbidden without    */
  378. X/*    specific, prior written permission from Harris Corporation.    */
  379. X/*    Tooltool technology includes, but is not limited to, the source    */
  380. X/*    code, executable binary files, specification language, and    */
  381. X/*    sample specification files.                    */
  382. X/************************************************************************/
  383. X
  384. X#include    "tooltool.h"
  385. X
  386. X#define        MIN_BUF_SIZE    32768
  387. X
  388. Xtypedef    struct    em_rec    em_data, *em_ptr;
  389. X
  390. Xstruct    em_rec    {int    size;
  391. X         int    remaining;
  392. X         char    *buf;
  393. X         em_ptr    next;
  394. X        };
  395. X
  396. XPRIVATE    em_ptr    buf_list = NULL;
  397. X
  398. X/************************************************************************/
  399. XEXPORT    char    *tt_emalloc(size)
  400. X
  401. Xint    size;
  402. X
  403. X{    em_ptr    em;
  404. X    char    *p;
  405. X
  406. X    size = ((size + 3) & ~3);
  407. X    for (em = buf_list; em; em = em->next)
  408. X       if (em->remaining >= size)
  409. X          break;
  410. X    if (em == NULL) {
  411. X       em = (em_ptr) safe_malloc(sizeof(em_data));
  412. X       em->size = em->remaining = max(size, MIN_BUF_SIZE);
  413. X       em->buf = (char *) safe_malloc(em->size);
  414. X       em->next = buf_list;
  415. X       buf_list = em;
  416. X       }
  417. X    p = em->buf + em->size - em->remaining;
  418. X    em->remaining -= size;
  419. X    return(p);
  420. X}
  421. X
  422. X/************************************************************************/
  423. XEXPORT    tt_reset_emalloc()
  424. X
  425. X{    em_ptr    em;
  426. X
  427. X    for (em = buf_list; em; em = em->next)
  428. X       em->remaining = em->size;
  429. X}
  430. X
  431. X/************************************************************************/
  432. XEXPORT    int    tt_is_temp(p)
  433. X
  434. Xchar    *p;
  435. X
  436. X{    em_ptr    em;
  437. X
  438. X    for (em = buf_list; em; em = em->next)
  439. X       if (p >= em->buf && p <= em->buf + em->size)
  440. X          return(TRUE);
  441. X    return(FALSE);
  442. X}
  443. END_OF_FILE
  444. if test 2541 -ne `wc -c <'emalloc.c'`; then
  445.     echo shar: \"'emalloc.c'\" unpacked with wrong size!
  446. fi
  447. # end of 'emalloc.c'
  448. fi
  449. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  450.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  451. else
  452. echo shar: Extracting \"'patchlevel.h'\" \(1755 characters\)
  453. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  454. X/************************************************************************/
  455. X/*                                    */
  456. X/*    Tooltool Version 2.0 Patch History                */
  457. X/*                                    */
  458. X/*    Date         Version    Comments                */
  459. X/*    01 Dec 88      2.0    Initial release                */
  460. X/*    25 Jan 89      2.0a    Small bug fixes:            */
  461. X/*                   Fixed ++ and -- when used with text    */
  462. X/*                       fields.                */
  463. X/*                   Changed to use access(2) to deter-    */
  464. X/*                       mine executability of applica-    */
  465. X/*                       tion.                */
  466. X/*                   Fixed bug in computing mouse offsets    */
  467. X/*                       when large fonts were used.    */
  468. X/*    02 Feb 89      2.1    Fixed bug in premature conversion of    */
  469. X/*                   strings to numbers.            */
  470. X/*                Added shift operators: >> and <<.    */
  471. X/*                Added assignment operators: +=, -=, *=,    */
  472. X/*                   /=, %=, &=, |=, and ^=.        */
  473. X/*                Readable, writable, and executable    */
  474. X/*                   intrinsic functions now use the    */
  475. X/*                   access(2) routine.            */
  476. X/*                Cleaned up scanning of punctuation.    */
  477. X/*                Fixed error message when EOF is hit.    */
  478. X/*                Fixed timeout while waiting for window    */
  479. X/*                   size to settle.            */
  480. X/*                Tooltool now searches your path for the    */
  481. X/*                   -f specification file.        */
  482. X/*                If the application is "", no applica-    */
  483. X/*                   tion window is created.        */
  484. X/*    18 Apr 89    2.1a    Fixed bug in scanning real numbers.    */
  485. X/*                Fixed initialization of text item     */
  486. X/*                   actions.                */
  487. X/*                Fixed function key mapping bug, so that    */
  488. X/*                   all function keys map correctly with    */
  489. X/*                   or without a .ttyswrc file entry.    */
  490. X/*    25 Apr 89    2.1b    Fixed the handling of meta keys in the    */
  491. X/*                   function key fix.            */
  492. X/*                                    */
  493. X/*     1 Jun 89    2.1c    Clarified wording of copyright notice.    */
  494. X/*                                    */
  495. X/************************************************************************/
  496. END_OF_FILE
  497. if test 1755 -ne `wc -c <'patchlevel.h'`; then
  498.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  499. fi
  500. # end of 'patchlevel.h'
  501. fi
  502. if test ! -d 'samples' ; then
  503.     echo shar: Creating directory \"'samples'\"
  504.     mkdir 'samples'
  505. fi
  506. if test -f 'samples/calc.tt' -a "${1}" != "-c" ; then 
  507.   echo shar: Will not clobber existing file \"'samples/calc.tt'\"
  508. else
  509. echo shar: Extracting \"'samples/calc.tt'\" \(1176 characters\)
  510. sed "s/^X//" >'samples/calc.tt' <<'END_OF_FILE'
  511. Xapplication "bc"
  512. X   size 2 by 20 characters
  513. X   label "<< Calculator >>"
  514. Xgadgets
  515. X   bottom
  516. X   proportional
  517. X   font "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
  518. X   button
  519. X      normal    " Clear "    send "c\n";
  520. X   end_button
  521. X   button
  522. X      normal    " Close "    close;
  523. X      shift    " Quit "    exit;
  524. X   end_button
  525. X   button
  526. X      normal    " 7 "        send "7";
  527. X   end_button
  528. X   button
  529. X      normal    " 8 "        send "8";
  530. X   end_button
  531. X   button
  532. X      normal    " 9 "        send "9";
  533. X   end_button
  534. X   button
  535. X      normal    " / "        send "/";
  536. X   end_button
  537. X   button
  538. X      normal    " 4 "        send "4";
  539. X   end_button
  540. X   button
  541. X      normal    " 5 "        send "5";
  542. X   end_button
  543. X   button
  544. X      normal    " 6 "        send "6";
  545. X   end_button
  546. X   button
  547. X      normal    " X "        send "*";
  548. X   end_button
  549. X   button
  550. X      normal    " 1 "        send "1";
  551. X   end_button
  552. X   button
  553. X      normal    " 2 "        send "2";
  554. X   end_button
  555. X   button
  556. X      normal    " 3 "        send "3";
  557. X   end_button
  558. X   button
  559. X      normal    " - "        send "-";
  560. X   end_button
  561. X   button
  562. X      normal    " 0 "        send "0";
  563. X   end_button
  564. X   button
  565. X      normal    " . "        send ".";
  566. X   end_button
  567. X   button
  568. X      normal    " = "        send "\n";
  569. X   end_button
  570. X   button
  571. X      normal    " + "        send "+";
  572. X   end_button
  573. Xend_gadgets
  574. END_OF_FILE
  575. if test 1176 -ne `wc -c <'samples/calc.tt'`; then
  576.     echo shar: \"'samples/calc.tt'\" unpacked with wrong size!
  577. fi
  578. # end of 'samples/calc.tt'
  579. fi
  580. if test -f 'samples/laserwriter.icon' -a "${1}" != "-c" ; then 
  581.   echo shar: Will not clobber existing file \"'samples/laserwriter.icon'\"
  582. else
  583. echo shar: Extracting \"'samples/laserwriter.icon'\" \(947 characters\)
  584. sed "s/^X//" >'samples/laserwriter.icon' <<'END_OF_FILE'
  585. X/* Format_version=1, Width=64, Height=30, Depth=1, Valid_bits_per_item=16
  586. X */
  587. X    0x888F,0xFFFF,0xFFFF,0xFFFC,0x2228,0x0000,0x0000,0x0006,
  588. X    0x2228,0x0000,0x0000,0x0006,0x8888,0x0000,0x0000,0x0004,
  589. X    0x8888,0x0000,0x0000,0x0004,0x222F,0xFFFF,0xFFFF,0xFFFE,
  590. X    0x2229,0x0100,0x0000,0x0806,0x8889,0x0100,0x0000,0x0804,
  591. X    0x8889,0x0100,0x0000,0x0804,0x2229,0x3D00,0x0000,0x0806,
  592. X    0x2229,0x2500,0x0F00,0x0806,0x8889,0x3D00,0x0900,0x0804,
  593. X    0x8889,0x3D00,0x0F00,0x0804,0x2229,0x3D00,0x0000,0x0806,
  594. X    0x2229,0x0100,0x0000,0x0806,0x8889,0x0100,0x0000,0x0804,
  595. X    0x8889,0x0100,0x0000,0x0808,0xE22F,0xFFFF,0xFFFF,0xF812,
  596. X    0xFE2F,0x8000,0x0000,0x07E2,0x9FFF,0x8000,0x0000,0x0028,
  597. X    0x8BFF,0x80FF,0xFFFF,0xF028,0x2222,0x8000,0x0000,0x0022,
  598. X    0x2222,0x80FF,0xFFFF,0xF022,0x8888,0x8000,0x0000,0x0028,
  599. X    0x8888,0x80FF,0xFFFF,0xF028,0x2222,0x8000,0x0000,0x0022,
  600. X    0x2222,0x80FF,0xFFFF,0xF022,0x8888,0x8000,0x0000,0x0028,
  601. X    0x8888,0xFFFF,0xFFFF,0xFFE8,0x2222,0x2FA2,0x2222,0x3E22
  602. END_OF_FILE
  603. if test 947 -ne `wc -c <'samples/laserwriter.icon'`; then
  604.     echo shar: \"'samples/laserwriter.icon'\" unpacked with wrong size!
  605. fi
  606. # end of 'samples/laserwriter.icon'
  607. fi
  608. if test -f 'samples/lpq.tt' -a "${1}" != "-c" ; then 
  609.   echo shar: Will not clobber existing file \"'samples/lpq.tt'\"
  610. else
  611. echo shar: Extracting \"'samples/lpq.tt'\" \(701 characters\)
  612. sed "s/^X//" >'samples/lpq.tt' <<'END_OF_FILE'
  613. Xapplication "queue"
  614. X   open send "b\n";
  615. X   close send "e\n";
  616. X   size 8 by 80 characters
  617. X   icon "laserwriter.icon"
  618. X   label "<< Print Queue Monitor >>"
  619. Xgadgets
  620. X   font "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
  621. X   align middle
  622. X   button
  623. X      normal    "Close"        close;
  624. X      shift    "Exit"        send "q\n";
  625. X   end_button
  626. X   button
  627. X      normal    "Start Polling"    send "b\n";
  628. X   end_button
  629. X   button
  630. X      normal    "Stop Polling"    send "e\n";
  631. X   end_button
  632. X   slider interval
  633. X      label "Interval:"
  634. X      minimum 5
  635. X      maximum 120
  636. X      width 75
  637. X      initial 10
  638. X      range off
  639. X      action send format("i%d\n", interval);
  640. X   end_slider
  641. Xend_gadgets
  642. Xkeys
  643. X   disable normal_keys
  644. X   disable function_keys
  645. Xend_keys
  646. END_OF_FILE
  647. if test 701 -ne `wc -c <'samples/lpq.tt'`; then
  648.     echo shar: \"'samples/lpq.tt'\" unpacked with wrong size!
  649. fi
  650. # end of 'samples/lpq.tt'
  651. fi
  652. if test -f 'samples/news.icon' -a "${1}" != "-c" ; then 
  653.   echo shar: Will not clobber existing file \"'samples/news.icon'\"
  654. else
  655. echo shar: Extracting \"'samples/news.icon'\" \(1933 characters\)
  656. sed "s/^X//" >'samples/news.icon' <<'END_OF_FILE'
  657. X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  658. X */
  659. X    0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
  660. X    0x8000,0x1100,0x0000,0x0001,0x8404,0x1900,0x0000,0x2021,
  661. X    0x8404,0x191C,0x4470,0x2021,0xAEAE,0x9522,0x4489,0x7575,
  662. X    0x9F1F,0x1522,0x5480,0xF8F9,0x8E0E,0x133E,0x5470,0x7071,
  663. X    0x8A0A,0x1320,0x5408,0x5051,0x9111,0x1122,0x5488,0x8889,
  664. X    0x8000,0x111C,0x2870,0x0001,0x8000,0x0000,0x0000,0x0001,
  665. X    0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
  666. X    0x8EEA,0xEEAA,0x0077,0x4671,0x88AE,0xAAEA,0x0045,0x4541,
  667. X    0x88AA,0xEEE4,0x0065,0x4571,0x88AA,0x8AA4,0x0045,0x4511,
  668. X    0x8EEA,0x8AA4,0x0047,0x7671,0x8000,0x0000,0x0000,0x0001,
  669. X    0x8EAE,0xEEEE,0xAE05,0x7571,0x8848,0x8884,0xA807,0x4541,
  670. X    0x8C48,0xCEE4,0x4C07,0x6771,0x88A8,0x8224,0x4805,0x4711,
  671. X    0x8EAE,0xEEEE,0x4E05,0x7571,0x8000,0x0000,0x0000,0x0001,
  672. X    0x8EE4,0xCEAE,0x0742,0x5761,0x8A8A,0xA4E8,0x0545,0x7451,
  673. X    0x8ECE,0xA4EA,0x0747,0x7651,0x8C8A,0xA4AA,0x0545,0x5451,
  674. X    0x8AEA,0xCEAE,0x0775,0x5761,0x8000,0x0000,0x0000,0x0001,
  675. X    0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
  676. X    0x8002,0xAA80,0x0200,0x0009,0xBFFB,0x55BF,0xFB00,0x0009,
  677. X    0x8002,0xAA80,0x0280,0x0009,0xBFFB,0x55BF,0xFA40,0x0009,
  678. X    0x8002,0xAA80,0x0220,0x0009,0xBFFB,0x55BF,0xFA11,0x8009,
  679. X    0x8002,0xAA80,0x020A,0x4009,0xBFFB,0x55BF,0xFA04,0x2009,
  680. X    0x8002,0xAA80,0x0200,0x1009,0xBFFB,0x55BF,0xFA00,0x0809,
  681. X    0x8002,0xAA80,0x0200,0x0589,0xBFFB,0x55BF,0xFA00,0x0249,
  682. X    0x8002,0xAA80,0x0200,0x0029,0xBFFB,0x55BF,0xFA00,0x0019,
  683. X    0x8003,0xFF80,0x0200,0x0009,0xBFF8,0x003F,0xFA00,0x0009,
  684. X    0x8000,0x0000,0x0200,0x0009,0xBFFB,0xFFBF,0xFA00,0x0009,
  685. X    0x8000,0x0000,0x0200,0x0009,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
  686. X    0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
  687. X    0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
  688. X    0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
  689. X    0x8000,0x0000,0x0000,0x0001,0xBFFB,0xFFBF,0xFBFF,0xFFF9,
  690. X    0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
  691. END_OF_FILE
  692. if test 1933 -ne `wc -c <'samples/news.icon'`; then
  693.     echo shar: \"'samples/news.icon'\" unpacked with wrong size!
  694. fi
  695. # end of 'samples/news.icon'
  696. fi
  697. if test -f 'samples/queue.c' -a "${1}" != "-c" ; then 
  698.   echo shar: Will not clobber existing file \"'samples/queue.c'\"
  699. else
  700. echo shar: Extracting \"'samples/queue.c'\" \(2397 characters\)
  701. sed "s/^X//" >'samples/queue.c' <<'END_OF_FILE'
  702. X#include    <stdio.h>
  703. X#include    <signal.h>
  704. X#include    <sgtty.h>
  705. X#include    <sys/time.h>
  706. X#include    <pwd.h>
  707. X
  708. X#define        strsave(s)    ((char *) strcpy((char *) malloc(strlen(s) + 1), s))
  709. X
  710. X#define        CLEAR        "\014"
  711. X#define        BOLD_ON        "\033[7m"
  712. X#define        BOLD_OFF    "\033[m"
  713. X
  714. X#define        LPQ        "/usr/ucb/lpq"
  715. X
  716. Xstruct    itimerval    interval = {{10, 0}, {10, 0}};
  717. Xstruct    itimerval    zero_timer = {{0, 0}, {0, 0}};
  718. X
  719. Xchar    *user_name;
  720. X
  721. Xchar    *strindex(source, target)
  722. X
  723. Xchar    *source;
  724. Xchar    *target;
  725. X
  726. X{    register    int    len;
  727. X
  728. X    len = strlen(target);
  729. X    for (; *source; source++)
  730. X       if (strncmp(source, target, len) == 0)
  731. X          return(source);
  732. X    return(0);
  733. X}
  734. X
  735. Xpoll()
  736. X
  737. X{    FILE    *f;
  738. X    char    buf[256];
  739. X    int    line;
  740. X
  741. X    if ((f = popen(LPQ, "r")) == NULL) {
  742. X       printf("%s%sCould not execute %s%s\n", CLEAR, BOLD_ON, LPQ, BOLD_OFF);
  743. X       return;
  744. X       }
  745. X    printf(CLEAR);
  746. X    for (line = 1; fgets(buf, 256, f) != NULL; line++)
  747. X       if (line <= 2 || strindex(buf, user_name))
  748. X          printf("%s%s%s", BOLD_ON, buf, BOLD_OFF);
  749. X       else
  750. X          printf(buf);
  751. X    pclose(f);
  752. X}
  753. X
  754. Xstart_timer()
  755. X
  756. X{
  757. X    setitimer(ITIMER_REAL, &interval, NULL);
  758. X}
  759. X
  760. Xstop_timer()
  761. X
  762. X{
  763. X    setitimer(ITIMER_REAL, &zero_timer, NULL);
  764. X}
  765. X
  766. Xmain()
  767. X
  768. X{    char    c;
  769. X    int    i;
  770. X    struct    sgttyb    tty, old_in, old_out;
  771. X    struct    passwd    *pp;
  772. X
  773. X    pp = getpwuid(getuid());
  774. X    user_name = strsave(pp->pw_name);
  775. X
  776. X    ioctl(0, TIOCGETP, &old_in);
  777. X    tty = old_in;
  778. X    tty.sg_flags |= CBREAK;
  779. X    tty.sg_flags &= ~ECHO;
  780. X    ioctl(0, TIOCSETP, &tty);
  781. X
  782. X    ioctl(1, TIOCGETP, &old_out);
  783. X    tty = old_out;
  784. X    tty.sg_flags |= CBREAK;
  785. X    tty.sg_flags &= ~ECHO;
  786. X    ioctl(1, TIOCSETP, &tty);
  787. X
  788. X    signal(SIGALRM, poll);
  789. X    poll();
  790. X    start_timer();
  791. X    while ((c = getchar()) != EOF)
  792. X       switch (c) {
  793. X          case 'b' : start_timer();
  794. X                   while (getchar() != '\n')
  795. X                      ;
  796. X                   break;
  797. X          case 'e' : stop_timer();
  798. X                   while (getchar() != '\n')
  799. X                      ;
  800. X                   break;
  801. X          case 'i' : for (i = 0; (c = getchar()) != '\n'; )
  802. X                      if (c >= '0' && c <= '9')
  803. X                         i = i * 10 + c - '0';
  804. X                   if (i == 0)
  805. X                      break;
  806. X                   interval.it_value.tv_sec = i;
  807. X                   interval.it_value.tv_usec = 0;
  808. X                   interval.it_interval.tv_sec = i;
  809. X                   interval.it_interval.tv_usec = 0;
  810. X                   start_timer();
  811. X                   break;
  812. X          case 'q' : stop_timer();
  813. X             ioctl(0, TIOCSETP, &old_in);
  814. X             ioctl(1, TIOCSETP, &old_out);
  815. X                   exit(0);
  816. X          }
  817. X    ioctl(0, TIOCSETP, &old_in);
  818. X    ioctl(1, TIOCSETP, &old_out);
  819. X    exit(0);
  820. X}
  821. END_OF_FILE
  822. if test 2397 -ne `wc -c <'samples/queue.c'`; then
  823.     echo shar: \"'samples/queue.c'\" unpacked with wrong size!
  824. fi
  825. # end of 'samples/queue.c'
  826. fi
  827. if test -f 'samples/rn.tt' -a "${1}" != "-c" ; then 
  828.   echo shar: Will not clobber existing file \"'samples/rn.tt'\"
  829. else
  830. echo shar: Extracting \"'samples/rn.tt'\" \(1112 characters\)
  831. sed "s/^X//" >'samples/rn.tt' <<'END_OF_FILE'
  832. Xapplication "rn -m=s"
  833. X   font "/usr/lib/fonts/fixedwidthfonts/screen.r.14"
  834. X   size 36 by 80 characters
  835. X   label "<< Newstool >>"
  836. X   icon "news.icon"
  837. Xgadgets
  838. X   top
  839. X   font "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
  840. X   button
  841. X      normal    "Restart Article"        send "^R";
  842. X      shift    "Decrypt Article"        send "^X";
  843. X   end_button
  844. X   button
  845. X      normal    "Previous Article"        send "P";
  846. X      shift    "Previous Unread Article"    send "p";
  847. X   end_button
  848. X   button
  849. X      normal    "Kill Subject"            send "k";
  850. X   end_button
  851. X   button
  852. X      normal    "Close"                close;
  853. X      shift    "Quit"                send "q";
  854. X   end_button
  855. X   button
  856. X      normal    "Subject List"            send "=";
  857. X   end_button
  858. X   button
  859. X      normal    "Next Article"            send "N";
  860. X      shift    "Next Unread Article"        send "n";
  861. X   end_button
  862. X   button
  863. X      normal    "Same Subject"            send "^N";
  864. X   end_button
  865. X   menu "Others"
  866. X      "Go to first unread article"        send "^";
  867. X      "Go to last article"            send "$";
  868. X      "Mark all articles read"            send "c";
  869. X      "Reply via mail"                send "r";
  870. X      "Reply, including article"        send "R";
  871. X      "Unsubscribe"                send "u";
  872. X   end_menu
  873. Xend_gadgets
  874. END_OF_FILE
  875. if test 1112 -ne `wc -c <'samples/rn.tt'`; then
  876.     echo shar: \"'samples/rn.tt'\" unpacked with wrong size!
  877. fi
  878. # end of 'samples/rn.tt'
  879. fi
  880. if test -f 'samples/stopwatch.icon' -a "${1}" != "-c" ; then 
  881.   echo shar: Will not clobber existing file \"'samples/stopwatch.icon'\"
  882. else
  883. echo shar: Extracting \"'samples/stopwatch.icon'\" \(1933 characters\)
  884. sed "s/^X//" >'samples/stopwatch.icon' <<'END_OF_FILE'
  885. X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  886. X */
  887. X    0x8888,0x888F,0xF888,0x8888,0x8888,0x888A,0xA888,0x8888,
  888. X    0x2222,0x222A,0xAA22,0x2222,0x2222,0x222A,0xAA22,0x2222,
  889. X    0x8888,0x888F,0xF888,0x8888,0x8888,0x888A,0x2888,0x8888,
  890. X    0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
  891. X    0x8888,0x88BF,0xFC88,0x8888,0x8888,0x89FF,0xFF88,0x8888,
  892. X    0x2222,0x2FE0,0x07F2,0x2222,0x2222,0x3F00,0x80FE,0x2222,
  893. X    0x8888,0xF800,0x801E,0x8888,0x8889,0xE000,0x8007,0x8888,
  894. X    0x2223,0xC000,0x8003,0xE222,0x2227,0x0000,0x8000,0xE222,
  895. X    0x888E,0x0000,0x0000,0x7888,0x889C,0x0000,0x0000,0x3888,
  896. X    0x2238,0x0000,0x0000,0x1E22,0x2271,0x0000,0x0000,0x8E22,
  897. X    0x88E0,0x8000,0x0001,0x0688,0x88E0,0x4000,0x0002,0x0788,
  898. X    0x23C0,0x2000,0x0004,0x03A2,0x2380,0x0000,0x0000,0x01A2,
  899. X    0x8B80,0x0000,0x0000,0x01C8,0x8B00,0x0000,0x0000,0x00C8,
  900. X    0x2300,0x0000,0x0000,0x00E2,0x2700,0x0000,0x0000,0x18E2,
  901. X    0x8E00,0x0000,0x0000,0x6068,0x8E00,0x0000,0x0003,0x8068,
  902. X    0x2E00,0x0000,0x000E,0x0072,0x2C00,0x0000,0x0078,0x0032,
  903. X    0x8C00,0x0000,0x01C0,0x0038,0x8C00,0x0000,0x0F00,0x0038,
  904. X    0x2C00,0x0000,0x3C00,0x0032,0x2DF0,0x0000,0xF000,0x0FB2,
  905. X    0x8C00,0x0000,0xC000,0x0038,0x8C00,0x0000,0x0000,0x0038,
  906. X    0x2C00,0x0000,0x0000,0x0032,0x2C00,0x0003,0xE000,0x0032,
  907. X    0x8C00,0x000C,0x1800,0x0038,0x8E00,0x0010,0x0400,0x0078,
  908. X    0x2600,0x0020,0x8200,0x0062,0x2600,0x0024,0x1200,0x0062,
  909. X    0x8F00,0x0040,0x2100,0x00E8,0x8B00,0x0040,0x4100,0x00C8,
  910. X    0x2300,0x0048,0x8900,0x00E2,0x2380,0x0040,0x0100,0x01E2,
  911. X    0x8980,0x0040,0x0100,0x0188,0x89C0,0x2024,0x1204,0x0388,
  912. X    0x22E0,0x4020,0x8202,0x0722,0x2260,0x8010,0x0401,0x0622,
  913. X    0x88F1,0x000C,0x1800,0x8E88,0x88B8,0x0003,0xE000,0x1C88,
  914. X    0x223C,0x0000,0x0000,0x3A22,0x222E,0x0000,0x0000,0x7222,
  915. X    0x888F,0x0000,0x8000,0xE888,0x888B,0xC000,0x8003,0xC888,
  916. X    0x2223,0xE000,0x8007,0xA222,0x2222,0x7800,0x801E,0x2222,
  917. X    0x8888,0xBF00,0x80FC,0x8888,0x8888,0x8FE0,0x07F8,0x8888,
  918. X    0x2222,0x23FF,0xFFA2,0x2222,0x2222,0x223F,0xFE22,0x2222
  919. END_OF_FILE
  920. if test 1933 -ne `wc -c <'samples/stopwatch.icon'`; then
  921.     echo shar: \"'samples/stopwatch.icon'\" unpacked with wrong size!
  922. fi
  923. # end of 'samples/stopwatch.icon'
  924. fi
  925. if test -f 'samples/top.icon' -a "${1}" != "-c" ; then 
  926.   echo shar: Will not clobber existing file \"'samples/top.icon'\"
  927. else
  928. echo shar: Extracting \"'samples/top.icon'\" \(1933 characters\)
  929. sed "s/^X//" >'samples/top.icon' <<'END_OF_FILE'
  930. X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  931. X */
  932. X    0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,
  933. X    0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
  934. X    0x8888,0xFFFF,0xFFFF,0x8888,0x8889,0xFFFF,0xFFFF,0x8888,
  935. X    0x2223,0xFFFF,0xFFFF,0xE222,0x2227,0xFFFF,0xFFFF,0xE222,
  936. X    0x888F,0xFFFF,0xFFFF,0xF888,0x889F,0xFFFF,0xFFFF,0xF888,
  937. X    0x223F,0xFFFF,0xFFFF,0xFA22,0x223F,0xFFFF,0xFFFF,0xFC22,
  938. X    0x88C8,0x8888,0x8888,0x8A88,0x88E2,0x2222,0x2222,0x2288,
  939. X    0x22C4,0x4444,0x4444,0x4522,0x2291,0x1111,0x1111,0x1122,
  940. X    0x8988,0x8888,0x8888,0x8888,0x8922,0x2222,0x2222,0x2288,
  941. X    0x2344,0x4444,0x4444,0x44A2,0x23FF,0xFFFF,0xFFFF,0xFFA2,
  942. X    0x8B77,0x7777,0x7777,0x7748,0x8BDD,0xDDDD,0xDDDD,0xDDC8,
  943. X    0x23BB,0xBBBB,0xBBBB,0xBBE2,0x22EE,0xEEEE,0xEEEE,0xEEE2,
  944. X    0x8B77,0x7777,0x7777,0x7748,0x8BDD,0xDDDD,0xDDDD,0xDDC8,
  945. X    0x23BB,0xBBBB,0xBBBB,0xBBE2,0x23FF,0xFFFF,0xFFFF,0xFFE2,
  946. X    0x8AAA,0xAAAA,0xAAAA,0xAAC8,0x8955,0x5555,0x5555,0x5588,
  947. X    0x23AA,0xAAAA,0xAAAA,0xAAA2,0x2355,0x5555,0x5555,0x55A2,
  948. X    0x89AA,0xAAAA,0xAAAA,0xAA88,0x88D5,0x5555,0x5555,0x5588,
  949. X    0x22AA,0xAAAA,0xAAAA,0xAB22,0x227F,0xFFFF,0xFFFF,0xFE22,
  950. X    0x88C8,0x8888,0x8888,0x8A88,0x88A8,0x8888,0x8888,0x8C88,
  951. X    0x2232,0x2222,0x2222,0x2A22,0x2232,0x2222,0x2222,0x2A22,
  952. X    0x8888,0x8888,0x8888,0x9888,0x888C,0x8888,0x8888,0xA888,
  953. X    0x2222,0x2222,0x2222,0x6222,0x2223,0xFFFF,0xFFFF,0xE222,
  954. X    0x8889,0x0000,0x0000,0x8888,0x8888,0x8000,0x0001,0x8888,
  955. X    0x2222,0x7FFF,0xFFFE,0x2222,0x2222,0x2000,0x0006,0x2222,
  956. X    0x8888,0x9000,0x0008,0x8888,0x8888,0x8FFF,0xFFF8,0x8888,
  957. X    0x2222,0x2400,0x0022,0x2222,0x2222,0x2200,0x0062,0x2222,
  958. X    0x8888,0x89FF,0xFF88,0x8888,0x8888,0x8880,0x0188,0x8888,
  959. X    0x2222,0x2240,0x0222,0x2222,0x2222,0x223F,0xFE22,0x2222,
  960. X    0x8888,0x8890,0x0888,0x8888,0x8888,0x8888,0x1888,0x8888,
  961. X    0x2222,0x2227,0xE222,0x2222,0x2222,0x2223,0xE222,0x2222,
  962. X    0x8888,0x8889,0x8888,0x8888,0x8888,0x8889,0x8888,0x8888,
  963. X    0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222
  964. END_OF_FILE
  965. if test 1933 -ne `wc -c <'samples/top.icon'`; then
  966.     echo shar: \"'samples/top.icon'\" unpacked with wrong size!
  967. fi
  968. # end of 'samples/top.icon'
  969. fi
  970. if test ! -d 'samples/vt100' ; then
  971.     echo shar: Creating directory \"'samples/vt100'\"
  972.     mkdir 'samples/vt100'
  973. fi
  974. if test -f 'samples/vt100/Makefile' -a "${1}" != "-c" ; then 
  975.   echo shar: Will not clobber existing file \"'samples/vt100/Makefile'\"
  976. else
  977. echo shar: Extracting \"'samples/vt100/Makefile'\" \(2045 characters\)
  978. sed "s/^X//" >'samples/vt100/Makefile' <<'END_OF_FILE'
  979. X#
  980. X#Here are the fields you may wish to change
  981. X#
  982. X# location of executable
  983. XBINDIR =    /usr/local/bin
  984. X# where do you store images?
  985. XIMAGEDIR =    /usr/local/images
  986. X# where do you want the manual pages to go?
  987. XMANDIR =     /usr/man/manl
  988. X# select an extension for the manual pages 
  989. X# that is, do you want /usr/man/manl/vtem.l or /usr/man/man1/vttool.1
  990. XMAN =        l
  991. X#
  992. X# now for compiler flags
  993. XCFLAGS =    -O
  994. X#
  995. X# the rest should be of little interest unless you are going to 
  996. X# enhance/debug/mail  this program
  997. X#
  998. XVSOURCES =     out.c term.c vtem.c
  999. XVTEMFILES =     ${VSOURCES} vtem.h vtem.1
  1000. XVOBJECTS =    term.o out.o vtem.o
  1001. XIMAGES =    edtkeys.ras newskeys.ras vt.icon
  1002. XMISCFILES =     VTEM_README Makefile vt102tool.tt edtkeys.ras.uu newskeys.ras.uu vt.icon
  1003. XSHAR = shar -c -v -p X
  1004. X
  1005. XCC=    /bin/cc
  1006. XLINTFLAGS = -DLINT
  1007. XLIBS =    -lsuntool -lsunwindow -lpixrect 
  1008. X
  1009. Xall:    vtem newskeys.ras edtkeys.ras
  1010. X
  1011. Xvtem:   ${VOBJECTS}
  1012. X    $(CC) $(CFLAGS) -o vtem ${VOBJECTS}  -ltermcap
  1013. X
  1014. X.c.o:   ; $(CC) $(CFLAGS) -c $*.c
  1015. X
  1016. Xedtkeys.ras:    edtkeys.ras.uu
  1017. X    uudecode edtkeys.ras.uu
  1018. X
  1019. Xnewskeys.ras:    newskeys.ras.uu
  1020. X    uudecode newskeys.ras.uu
  1021. X
  1022. Xinstall: all
  1023. X    install -s vtem $(BINDIR)/vtem
  1024. X    sed<vt102tool.tt >$(BINDIR)/vt102tool.tt -e 's=/usr/local/images=$(IMAGEDIR)='
  1025. X    cp $(IMAGES) $(IMAGEDIR)
  1026. X    cp vtem.1 ${MANDIR}/vtem.${MAN}
  1027. X
  1028. Xlint:
  1029. X    lint $(LINTFLAGS) $(SOURCES) -lc $(LIBS)
  1030. X
  1031. Xshar: vtem.shar
  1032. X    touch shar
  1033. Xvtem.shar: ${VTEMFILES} ${MISCFILES}
  1034. X    ${SHAR} ${MISCFILES} ${VTEMFILES} >vtem.shar
  1035. X
  1036. Xclean:
  1037. X    rm -f core tags a.out ${VOBJECTS} vtem shar vtem.shar
  1038. X
  1039. Xdepend: 
  1040. X    @-grep '^#include' $(VSOURCES) | grep -v '<' | grep -v '../' | \
  1041. X    sed 's/:[^"]*"\([^"]*\)".*/: \1/' | sed 's/\.[cs]:/.o:/' | \
  1042. X    awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
  1043. X            else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
  1044. X                   else rec = rec " " $$2 } } \
  1045. X          END { print rec } ' >> makedep
  1046. X    echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
  1047. X    echo '$$r makedep' >>eddep
  1048. X    echo 'w' >>eddep
  1049. X    cp Makefile Makefile.bak
  1050. X    ex - Makefile < eddep
  1051. X    rm eddep makedep
  1052. X
  1053. X
  1054. X# DO NOT DELETE THIS LINE -- make depend uses it
  1055. END_OF_FILE
  1056. if test 2045 -ne `wc -c <'samples/vt100/Makefile'`; then
  1057.     echo shar: \"'samples/vt100/Makefile'\" unpacked with wrong size!
  1058. fi
  1059. # end of 'samples/vt100/Makefile'
  1060. fi
  1061. if test -f 'samples/vt100/VTEM_README' -a "${1}" != "-c" ; then 
  1062.   echo shar: Will not clobber existing file \"'samples/vt100/VTEM_README'\"
  1063. else
  1064. echo shar: Extracting \"'samples/vt100/VTEM_README'\" \(1524 characters\)
  1065. sed "s/^X//" >'samples/vt100/VTEM_README' <<'END_OF_FILE'
  1066. XVTEM is a termcap-based VT100 terminal emulator originally written by
  1067. XLeif Samuelsson (lsamuelsson@erisun) in December, 1985.  It has
  1068. Xbeen posted in various forms.  This shar file contains a major revision
  1069. Xof the package to support more complete VT100 emulation on a wider variety
  1070. Xof terminals.  Major changes to this version include:
  1071. X
  1072. X1/ emulates a VT52 (sort of), VT100, or VT102 depending on terminal
  1073. X   capabilities available in the termcap entry.
  1074. X2/ responds to terminal inquiries, e.g. VMS "set term/inquire".
  1075. X3/ fixes many bugs in the terminal emulation.  It now passes most of
  1076. X   the vttest test suite with the exception of graphic characters,
  1077. X   keyboard input, and double high/double wide lines.  On terminals
  1078. X   with less than 132 columns or limited standout capabilities it does
  1079. X   a reasonable job of displaying what it can.  Emulation is
  1080. X   approximately as good as (or slightly better than) ms-kermit with
  1081. X   an IBM mono video adapter.
  1082. X4/ supports VT102 emulation on terminals whose termcap entry includes
  1083. X   insert/delete character.
  1084. X5/ correctly outputs "ti" and "te" sequences (needed if run from a Sun
  1085. X   cmdtool to turn off scroll bar).
  1086. X   
  1087. XRevisions February 1989 by JQ Johnson <jqj@hogg.cc.uoregon.edu>.
  1088. X
  1089. XVTEM does not provide a VT100-style keypad.  However, under SunView it
  1090. Xcan be used with vttool or tooltool to provide such a mousable keypad.
  1091. X
  1092. XTo use with tooltool, give the command:
  1093. X    tooltool -f vt102tool.tt
  1094. X
  1095. XTooltool is available from Chuck Musciano, at trantor.harris-atd.com by 
  1096. Xanonymous ftp.
  1097. END_OF_FILE
  1098. if test 1524 -ne `wc -c <'samples/vt100/VTEM_README'`; then
  1099.     echo shar: \"'samples/vt100/VTEM_README'\" unpacked with wrong size!
  1100. fi
  1101. # end of 'samples/vt100/VTEM_README'
  1102. fi
  1103. if test -f 'samples/vt100/vt.icon' -a "${1}" != "-c" ; then 
  1104.   echo shar: Will not clobber existing file \"'samples/vt100/vt.icon'\"
  1105. else
  1106. echo shar: Extracting \"'samples/vt100/vt.icon'\" \(1933 characters\)
  1107. sed "s/^X//" >'samples/vt100/vt.icon' <<'END_OF_FILE'
  1108. X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  1109. X */
  1110. X    0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
  1111. X    0x8003,0xFFFF,0xFFFF,0xF801,0x8004,0x0000,0x0000,0x0601,
  1112. X    0x8004,0x7FFF,0xFFF8,0x0501,0x8004,0x8000,0x0004,0x0481,
  1113. X    0x8005,0x0000,0x0002,0x0441,0x8005,0x0000,0x0002,0x0421,
  1114. X    0x8005,0x0000,0x0002,0x0411,0x8005,0x0000,0x0002,0x0409,
  1115. X    0x8005,0x0000,0x0002,0x0409,0x8005,0x45F1,0x0C32,0x0409,
  1116. X    0x8005,0x4443,0x124A,0x0409,0x8005,0x4441,0x165A,0x0409,
  1117. X    0x8005,0x2841,0x1A6A,0x0409,0x8005,0x2841,0x124A,0x0409,
  1118. X    0x8005,0x1043,0x8C32,0x0409,0x8005,0x0000,0x0002,0x0409,
  1119. X    0x8005,0x0000,0x0002,0x0409,0x8005,0x0000,0x0002,0x0409,
  1120. X    0x8005,0x0000,0x0002,0x0409,0x8005,0x0000,0x0002,0x0409,
  1121. X    0x8005,0x0000,0x0002,0x0409,0x8005,0x0000,0x0002,0x0409,
  1122. X    0x8004,0x8000,0x0004,0x0409,0x8004,0x7FFF,0xFFF8,0x0409,
  1123. X    0x8004,0x0000,0x0000,0x0409,0x8004,0x0000,0x0000,0x0409,
  1124. X    0x8004,0x0000,0x0000,0x0409,0x8004,0x0000,0x0000,0x0409,
  1125. X    0x8004,0x0000,0x0000,0x0409,0x8004,0x0000,0x0000,0x0409,
  1126. X    0x8004,0x0000,0x0000,0x0409,0x8004,0x0000,0x0000,0x0409,
  1127. X    0x801F,0xFFFF,0xFFFF,0xFFF9,0x8020,0x0000,0x0000,0x0089,
  1128. X    0x8020,0x0000,0x0000,0x0109,0x8045,0x5555,0x5555,0x2909,
  1129. X    0x8080,0x0000,0x0000,0x0209,0x808A,0xAAAA,0xAAAA,0x5209,
  1130. X    0x8100,0x0000,0x0000,0x0409,0x8115,0x5555,0x5554,0xA409,
  1131. X    0x8200,0x0000,0x0000,0x0809,0x820D,0xFFFF,0xFFD8,0x0809,
  1132. X    0x8400,0x0000,0x0000,0x1009,0x87FF,0xFFFF,0xFFFF,0xFFF9,
  1133. X    0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  1134. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1135. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1136. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1137. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1138. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1139. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1140. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1141. X    0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
  1142. END_OF_FILE
  1143. if test 1933 -ne `wc -c <'samples/vt100/vt.icon'`; then
  1144.     echo shar: \"'samples/vt100/vt.icon'\" unpacked with wrong size!
  1145. fi
  1146. # end of 'samples/vt100/vt.icon'
  1147. fi
  1148. if test -f 'samples/vt100/vtem.1' -a "${1}" != "-c" ; then 
  1149.   echo shar: Will not clobber existing file \"'samples/vt100/vtem.1'\"
  1150. else
  1151. echo shar: Extracting \"'samples/vt100/vtem.1'\" \(2404 characters\)
  1152. sed "s/^X//" >'samples/vt100/vtem.1' <<'END_OF_FILE'
  1153. X.TH VTEM 1 1989-05-09
  1154. X.\" $Header: /home/hogg/src/local/vt/RCS/vtem.1,v 1.2 89/05/09 11:01:24 jqj Exp $
  1155. X.\"
  1156. X.\" $Log:    vtem.1,v $
  1157. X.\" Revision 1.2  89/05/09  11:01:24  jqj
  1158. X.\" update for vtem version 1.2, e.g. VT102 support.  Also cleaned up man page.
  1159. X.\" 
  1160. X.\"
  1161. X.SH NAME
  1162. Xvtem \- a VT102 emulator based on termcap
  1163. X.SH SYNOPSIS
  1164. X.B vtem
  1165. X[
  1166. X.I command
  1167. X]
  1168. X.SH DESCRIPTION
  1169. X.LP
  1170. X.I vtem
  1171. Xruns on BSD4.2 and works by starting a sub-shell and then translating
  1172. Xoutput escape sequences.  Its function is limited by the capabilities
  1173. Xlisted in the termcap database and the capabilities of the actual
  1174. Xterminal that it is being run on.
  1175. X.LP
  1176. XIf arguments are given, then this command is passed to the shell, e.g.:
  1177. X
  1178. X    vtem telnet ibm
  1179. X
  1180. XThe emulator has been tested with Per Lindberg's excellent verifier ,
  1181. X.IR vttest ,
  1182. Xand has been found to give acceptable results on the following terminals:
  1183. X.br
  1184. X    Sun windows
  1185. X.br
  1186. X    PC-Kermit in h19 emulation mode.
  1187. X.br
  1188. X    VT100    (!)
  1189. X.LP
  1190. XOn a Sun, you can use the following Suntools rootmenu entry:
  1191. X.LP
  1192. X.nf
  1193. X"VT100 Tool" shelltool -Ww 80 -Wh 24 -Wl "VT100 Tool" vtem
  1194. X.fi
  1195. X.LP
  1196. XYou can also use 
  1197. X.I vttool 
  1198. Xor 
  1199. X.I tooltool 
  1200. Xto provide buttons for vtem.
  1201. X.SH BUGS
  1202. X.LP
  1203. XRelease 1.2 (jqj) of vtem has the following bugs and limitations:
  1204. X.LP
  1205. XRegion scroll will only work on terminals with
  1206. Xsr or al/dl capabilities.  On terminals without these capabilities,
  1207. X.I vtem
  1208. Xemulates a VT52.
  1209. X.LP
  1210. XOn terminals without delete and insert character (dc and either ic or im) 
  1211. Xcapabilities,
  1212. X.I vtem
  1213. Xemulates a VT100.  If these capabilities are present,
  1214. X.I vtem
  1215. Xemulates a VT102.
  1216. X.LP
  1217. XIt will never write in the last position of the screen,
  1218. Xbecause of the unpredictable behaviour of many terminals.
  1219. X.LP
  1220. XNo soft scroll.
  1221. X.LP
  1222. XThe display is truncated on the right at either the actual number of
  1223. Xcolumns on the screen or 80 (132 in 132 column mode), whichever is
  1224. Xless.  On normal 80-column displays, this implies that 132 column mode
  1225. Xis effectively useless.
  1226. X.LP
  1227. XInput is not translated, which means no function key emulation.
  1228. X(See vttool).
  1229. X.LP
  1230. XNo double height or double width lines.
  1231. X.LP
  1232. XNo alternate character set, meaning very limited graphics.
  1233. X.LP
  1234. XNo printer support.
  1235. X.LP
  1236. XNo settable answerback messages.
  1237. X.LP
  1238. XNo SETUP mode.
  1239. X.LP
  1240. XNo LEDs.
  1241. X.SH AUTHOR
  1242. X.LP
  1243. XOriginal author Leif Samuelsson, leif@erisun.UUCP or ..enea!erix!erisun!leif
  1244. X.LP
  1245. XModifications by Bruce G. Barnett, barnett@crd.ge.com, and JQ Johnson, jqj@oregon.uoregon.edu 
  1246. X
  1247. X
  1248. END_OF_FILE
  1249. if test 2404 -ne `wc -c <'samples/vt100/vtem.1'`; then
  1250.     echo shar: \"'samples/vt100/vtem.1'\" unpacked with wrong size!
  1251. fi
  1252. # end of 'samples/vt100/vtem.1'
  1253. fi
  1254. if test -f 'samples/vt100/vtem.h' -a "${1}" != "-c" ; then 
  1255.   echo shar: Will not clobber existing file \"'samples/vt100/vtem.h'\"
  1256. else
  1257. echo shar: Extracting \"'samples/vt100/vtem.h'\" \(1542 characters\)
  1258. sed "s/^X//" >'samples/vt100/vtem.h' <<'END_OF_FILE'
  1259. X/*
  1260. X * vtem - A termcap driven VT100 emulator for BSD Unix
  1261. X *
  1262. X * $Header: /home/src/local/vttool/RCS/vtem.h,v 1.2 89/02/08 16:05:27 jqj Exp $
  1263. X *
  1264. X * Public domain software.
  1265. X * Written by Leif Samuelsson (lsamuelsson@erisun) in December, 1985
  1266. X * 
  1267. X * $Log:    vtem.h,v $
  1268. X * Revision 1.2  89/02/08  16:05:27  jqj
  1269. X * 1/ added enumerated type and terminal capabilities for VT102 support
  1270. X * 2/ redefined set_cursor to handle c values greater than CO [N.B. c is 
  1271. X *    now evaluated twice so don't do ``set_cursor(col++,row)'']
  1272. X * 
  1273. X */
  1274. X
  1275. X#include <stdio.h>
  1276. X#include <signal.h>
  1277. X#include <sys/types.h>
  1278. X#include <sys/time.h>
  1279. X#include <sys/stat.h>
  1280. X#include <sys/ioctl.h>
  1281. X
  1282. X#define FALSE 0
  1283. X#define TRUE 1
  1284. X
  1285. Xtypedef short Bool;
  1286. X
  1287. Xextern char *getenv();
  1288. Xextern putchar_x();
  1289. X
  1290. Xextern struct sgttyb oldb, newb;
  1291. Xextern struct tchars oldtchars, newtchars;
  1292. Xextern struct ltchars oldltchars, newltchars;
  1293. Xextern int oldlb, newlb, oldl, newl;
  1294. X
  1295. Xextern int master;
  1296. X
  1297. Xenum vt_terminal {VT52, VT100, VT102};
  1298. Xextern enum vt_terminal vttype;
  1299. X
  1300. Xextern Bool BS;
  1301. Xextern int CO, LI;
  1302. Xextern char  *AL, *BC, *BL, *CB, *CD, *CL, *CE, *CM, *CR, *CS, *DC,
  1303. X    *DL, *DO, *EI, *IC, *IM,
  1304. X    *KE, *KS, *MB, *MD, *ME, *MR, *ND, *NL, *SE, *SO, *SR, 
  1305. X    *TI, *TE, *UE, *UP, *US, *MAL, *MDL;
  1306. X
  1307. X#define tputs_x(s)        (tputs(s, 1, putchar_x))
  1308. X#define tputs_pad(s,pad)    (tputs(s, (pad), putchar_x))
  1309. X
  1310. X
  1311. X#define backspace()        (tputs_x(BC))
  1312. X#define clear_screen()        (tputs_pad(CL,LI))
  1313. X#define set_cursor(c, r)    (tputs_x(tgoto(CM, ((c)>=CO?CO-1:(c)), (r))))
  1314. X#define linefeed()        (tputs_x(NL))
  1315. X#define cr()            (tputs_x(CR))
  1316. END_OF_FILE
  1317. if test 1542 -ne `wc -c <'samples/vt100/vtem.h'`; then
  1318.     echo shar: \"'samples/vt100/vtem.h'\" unpacked with wrong size!
  1319. fi
  1320. # end of 'samples/vt100/vtem.h'
  1321. fi
  1322. if test -f 'selection.c' -a "${1}" != "-c" ; then 
  1323.   echo shar: Will not clobber existing file \"'selection.c'\"
  1324. else
  1325. echo shar: Extracting \"'selection.c'\" \(2511 characters\)
  1326. sed "s/^X//" >'selection.c' <<'END_OF_FILE'
  1327. X/************************************************************************/
  1328. X/*    Copyright 1988 by Chuck Musciano and Harris Corporation        */
  1329. X/*                                    */
  1330. X/*    Permission to use, copy, modify, and distribute this software    */
  1331. X/*    and its documentation for any purpose and without fee is    */
  1332. X/*    hereby granted, provided that the above copyright notice    */
  1333. X/*    appear in all copies and that both that copyright notice and    */
  1334. X/*    this permission notice appear in supporting documentation, and    */
  1335. X/*    that the name of Chuck Musciano and Harris Corporation not be    */
  1336. X/*    used in advertising or publicity pertaining to distribution    */
  1337. X/*    of the software without specific, written prior permission.    */
  1338. X/*    Chuck Musciano and Harris Corporation make no representations    */
  1339. X/*    about the suitability of this software for any purpose.  It is    */
  1340. X/*    provided "as is" without express or implied warranty.        */
  1341. X/*                                    */
  1342. X/*    The sale of any product based wholely or in part upon the     */
  1343. X/*    technology provided by tooltool is strictly forbidden without    */
  1344. X/*    specific, prior written permission from Harris Corporation.    */
  1345. X/*    Tooltool technology includes, but is not limited to, the source    */
  1346. X/*    code, executable binary files, specification language, and    */
  1347. X/*    sample specification files.                    */
  1348. X/************************************************************************/
  1349. X
  1350. X#include    <stdio.h>
  1351. X#include    <sys/types.h>
  1352. X#include    <suntool/selection_svc.h>
  1353. X#include    <suntool/selection_attributes.h>
  1354. X
  1355. X#include    "tooltool.h"
  1356. X
  1357. XPRIVATE    Seln_result    read_proc();
  1358. X
  1359. XPRIVATE    char    *buf, *pos;
  1360. X
  1361. XEXPORT    char    *tt_get_selection(level)
  1362. X
  1363. Xint    level;
  1364. X
  1365. X{    Seln_client    client;
  1366. X    Seln_holder    holder;
  1367. X    Seln_rank    rank;
  1368. X    char        context = 0;
  1369. X
  1370. X    if (level == 1)
  1371. X       rank = SELN_PRIMARY;
  1372. X    else if (level == 2)
  1373. X       rank = SELN_SECONDARY;
  1374. X    else if (level == 3)
  1375. X       rank = SELN_SHELF;
  1376. X    else
  1377. X       return("");
  1378. X    holder = seln_inquire(rank);
  1379. X    if (holder.state == SELN_NONE)
  1380. X       return("");
  1381. X    pos = buf = tt_emalloc(65536);
  1382. X    *buf = '\0';
  1383. X    seln_query(&holder, read_proc, &context, SELN_REQ_CONTENTS_ASCII, 0, 0);
  1384. X    return(buf);
  1385. X}
  1386. X
  1387. XPRIVATE    Seln_result    read_proc(buffer)
  1388. X
  1389. XSeln_request    *buffer;
  1390. X
  1391. X{    char    *reply;
  1392. X
  1393. X    if (buffer) {
  1394. X       if (*buffer->requester.context == 0) {
  1395. X          if (*((Seln_attribute *) buffer->data) != SELN_REQ_CONTENTS_ASCII)
  1396. X             return(SELN_FAILED);
  1397. X          reply = buffer->data + sizeof(Seln_attribute);
  1398. X          *buffer->requester.context = 1;
  1399. X          }
  1400. X       else
  1401. X          reply = buffer->data;
  1402. X       strcpy(pos, reply);
  1403. X       pos += strlen(reply);
  1404. X       }
  1405. X    return(SELN_SUCCESS);
  1406. X}
  1407. END_OF_FILE
  1408. if test 2511 -ne `wc -c <'selection.c'`; then
  1409.     echo shar: \"'selection.c'\" unpacked with wrong size!
  1410. fi
  1411. # end of 'selection.c'
  1412. fi
  1413. if test -f 'tooltool.icon' -a "${1}" != "-c" ; then 
  1414.   echo shar: Will not clobber existing file \"'tooltool.icon'\"
  1415. else
  1416. echo shar: Extracting \"'tooltool.icon'\" \(1933 characters\)
  1417. sed "s/^X//" >'tooltool.icon' <<'END_OF_FILE'
  1418. X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  1419. X */
  1420. X    0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
  1421. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1422. X    0x87FF,0xFFF0,0x0FFF,0xFFE1,0x8800,0x0008,0x1000,0x0011,
  1423. X    0x8BF8,0x0048,0x17F0,0x0091,0x8840,0x0048,0x1080,0x0091,
  1424. X    0x8840,0x0048,0x1080,0x0091,0x8847,0x1C48,0x108E,0x3891,
  1425. X    0x8848,0xA248,0x1091,0x4491,0x8848,0xA248,0x1091,0x4491,
  1426. X    0x8848,0xA248,0x1091,0x4491,0x8847,0x1C48,0x108E,0x3891,
  1427. X    0x8800,0x0008,0x1000,0x0011,0x87FF,0xFFF0,0x0FFF,0xFFE1,
  1428. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1429. X    0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  1430. X    0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
  1431. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1432. X    0x8020,0x8181,0x81C2,0x0011,0x8020,0x8181,0x81C2,0x0011,
  1433. X    0x8FFF,0xFCFF,0xFFFF,0xFFE1,0x8FFF,0xFCFF,0xFFFF,0xFFE1,
  1434. X    0x8280,0x0000,0x0000,0x0001,0x8280,0x0000,0x0000,0x0001,
  1435. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1436. X    0x8000,0x4004,0x0100,0x0001,0x8000,0x4004,0x0100,0x0001,
  1437. X    0x8FEF,0x7BDF,0xFFFC,0x0001,0x8FEF,0x7BDF,0xFFFC,0x0001,
  1438. X    0x8000,0x0800,0x0000,0x0001,0x8000,0x0800,0x0000,0x0001,
  1439. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1440. X    0x8042,0x2000,0x0000,0x0001,0x8042,0x2000,0x0000,0x0001,
  1441. X    0x8FFF,0xBE00,0x0000,0x0001,0x8FFF,0xBE00,0x0000,0x0001,
  1442. X    0x8410,0x0400,0x0000,0x0001,0x8410,0x0400,0x0000,0x0001,
  1443. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1444. X    0x8011,0x8000,0x0000,0x0001,0x8011,0x8000,0x0000,0x0001,
  1445. X    0x801F,0xF800,0x0000,0x0001,0x801F,0xF800,0x0000,0x0001,
  1446. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1447. X    0x8000,0x0900,0x5298,0x0001,0x8000,0x0900,0x5298,0x0001,
  1448. X    0x801F,0xF8FF,0x7C70,0x0001,0x801F,0xF8FF,0x7C70,0x0001,
  1449. X    0x8000,0x0020,0x0000,0x0001,0x8000,0x0020,0x0000,0x0001,
  1450. X    0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
  1451. X    0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
  1452. END_OF_FILE
  1453. if test 1933 -ne `wc -c <'tooltool.icon'`; then
  1454.     echo shar: \"'tooltool.icon'\" unpacked with wrong size!
  1455. fi
  1456. # end of 'tooltool.icon'
  1457. fi
  1458. if test -f 'tooltool.man' -a "${1}" != "-c" ; then 
  1459.   echo shar: Will not clobber existing file \"'tooltool.man'\"
  1460. else
  1461. echo shar: Extracting \"'tooltool.man'\" \(791 characters\)
  1462. sed "s/^X//" >'tooltool.man' <<'END_OF_FILE'
  1463. X.TH TOOLTOOL 1 "28 March 1988"
  1464. X.SH NAME
  1465. Xtooltool \- create a windowed tool
  1466. X.SH SYNOPSIS
  1467. X\fBtooltool\fP [ \fB-f\fP \fIfile\fP ] [ \fIargs\fP ]
  1468. X.SH DESCRIPTION
  1469. XTooltool creates a windowed application based upon specifications read from
  1470. Xits standard input.  If \fB-f\fP is specified, the specifications are
  1471. Xread from the indicated \fIfile\fP.  The shell search path is used to
  1472. Xlocate \fIfile\fP if it is not a complete pathname.  Any \fIargs\fP are
  1473. Xpassed on to the windowed application.
  1474. X.LP
  1475. XThe details of the application specification are too numerous to mention
  1476. Xhere.  The user is referred to the \fITooltool User's Guide\fP for 
  1477. Xmore information.
  1478. X.SH AUTHOR
  1479. XChuck Musciano
  1480. X.br
  1481. XAdvanced Technology Department
  1482. X.br
  1483. XHarris Corporation
  1484. X.br
  1485. X(407) 727-6131
  1486. X.br
  1487. XARPA: chuck@trantor.harris-atd.com
  1488. X
  1489. END_OF_FILE
  1490. if test 791 -ne `wc -c <'tooltool.man'`; then
  1491.     echo shar: \"'tooltool.man'\" unpacked with wrong size!
  1492. fi
  1493. # end of 'tooltool.man'
  1494. fi
  1495. echo shar: End of archive 1 \(of 13\).
  1496. cp /dev/null ark1isdone
  1497. MISSING=""
  1498. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do
  1499.     if test ! -f ark${I}isdone ; then
  1500.     MISSING="${MISSING} ${I}"
  1501.     fi
  1502. done
  1503. if test "${MISSING}" = "" ; then
  1504.     echo You have unpacked all 13 archives.
  1505.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1506. else
  1507.     echo You still need to unpack the following archives:
  1508.     echo "        " ${MISSING}
  1509. fi
  1510. ##  End of shell archive.
  1511. exit 0
  1512.